(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
qsort, append, filterlow, filterhigh, ge

They will be analysed ascendingly in the following order:
append < qsort
filterlow < qsort
filterhigh < qsort
ge < filterlow
ge < filterhigh

(6) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
append, qsort, filterlow, filterhigh, ge

They will be analysed ascendingly in the following order:
append < qsort
filterlow < qsort
filterhigh < qsort
ge < filterlow
ge < filterhigh

(7) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol append.

(8) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
ge, qsort, filterlow, filterhigh

They will be analysed ascendingly in the following order:
filterlow < qsort
filterhigh < qsort
ge < filterlow
ge < filterhigh

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

Induction Base:
ge(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
true

Induction Step:
ge(gen_0':s5_0(+(n19_0, 1)), gen_0':s5_0(+(n19_0, 1))) →RΩ(1)
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
filterlow, qsort, filterhigh

They will be analysed ascendingly in the following order:
filterlow < qsort
filterhigh < qsort

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)

Induction Base:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(0)) →RΩ(1)
nil

Induction Step:
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(+(n324_0, 1))) →RΩ(1)
if1(ge(gen_0':s5_0(0), 0'), gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n324_0)) →LΩ(1)
if1(true, gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n324_0)) →RΩ(1)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) →IH
gen_nil:cons:ys4_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
filterhigh, qsort

They will be analysed ascendingly in the following order:
filterhigh < qsort

(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n903_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n9030)

Induction Base:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(0)) →RΩ(1)
nil

Induction Step:
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(+(n903_0, 1))) →RΩ(1)
if2(ge(0', gen_0':s5_0(0)), gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n903_0)) →LΩ(1)
if2(true, gen_0':s5_0(0), 0', gen_nil:cons:ys4_0(n903_0)) →RΩ(1)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n903_0)) →IH
gen_nil:cons:ys4_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(16) Complex Obligation (BEST)

(17) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n903_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n9030)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

The following defined symbols remain to be analysed:
qsort

(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol qsort.

(19) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n903_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n9030)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

(21) BOUNDS(n^1, INF)

(22) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)
filterhigh(gen_0':s5_0(0), gen_nil:cons:ys4_0(n903_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n9030)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

(24) BOUNDS(n^1, INF)

(25) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)
filterlow(gen_0':s5_0(0), gen_nil:cons:ys4_0(n324_0)) → gen_nil:cons:ys4_0(0), rt ∈ Ω(1 + n3240)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

(27) BOUNDS(n^1, INF)

(28) Obligation:

Innermost TRS:
Rules:
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))

Types:
qsort :: nil:cons:ys → nil:cons:ys
nil :: nil:cons:ys
cons :: 0':s → nil:cons:ys → nil:cons:ys
append :: nil:cons:ys → nil:cons:ys → nil:cons:ys
filterlow :: 0':s → nil:cons:ys → nil:cons:ys
filterhigh :: 0':s → nil:cons:ys → nil:cons:ys
if1 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
if2 :: true:false → 0':s → 0':s → nil:cons:ys → nil:cons:ys
0' :: 0':s
s :: 0':s → 0':s
ys :: nil:cons:ys
hole_nil:cons:ys1_0 :: nil:cons:ys
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons:ys4_0 :: Nat → nil:cons:ys
gen_0':s5_0 :: Nat → 0':s

Lemmas:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

Generator Equations:
gen_nil:cons:ys4_0(0) ⇔ nil
gen_nil:cons:ys4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons:ys4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
ge(gen_0':s5_0(n19_0), gen_0':s5_0(n19_0)) → true, rt ∈ Ω(1 + n190)

(30) BOUNDS(n^1, INF)